package com.yuanfeng.goods.feign;

import com.yuanfeng.commoms.dto.base.DealerGoodsUserInfoDTO;
import com.yuanfeng.commoms.dto.goods.GoodsMerchantSearchWordDTO;
import com.yuanfeng.commoms.dto.goods.NavSortLogoDTO;
import com.yuanfeng.commoms.util.ResponseResult;
import com.yuanfeng.commoms.vo.base.BaseGoodsConfigVO;
import com.yuanfeng.commoms.vo.base.DealerApplyInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Stranger
 * @date 2023/3/21 10:59
 */
@FeignClient(name = "mall-base", url = "http://localhost:8011")
public interface BaseServiceClient {
    /**
     * 根据configKey 查询配置 feign
     */
    @PostMapping("base/sysConfig/queryConfigKeyFeign")
    String selectConfigValueFeign(@RequestParam String configKey);

    /**
     * 查询首页logo
     *
     * @param gdbNavSortLogoDTO
     * @return
     */
    @PostMapping("/base/sysConfig/quertNavLogo")
    ResponseResult quertNavLogo(@RequestBody NavSortLogoDTO gdbNavSortLogoDTO);

    /**
     * 查询plus 会员规则  feign
     */
    @PostMapping("base/merchantPlusRule/query")
    ResponseResult queryMerchantPlusRule();

    /**
     *   查询热搜词 feign
     * @return
     */
    @PostMapping("base/baseSearchWord/queryHotSearchWords")
    GoodsMerchantSearchWordDTO queryHotSearchWords(@RequestParam String commonName);

    /**
     *   修改热搜词 feign
     * @return
     */
    @PostMapping("base/baseSearchWord/updateHotSearchWords")
    Integer updateHotSearchWords(@RequestBody GoodsMerchantSearchWordDTO goodsMerchantSearchWordDto);

    /**
     *   添加热搜词 feign
     * @return
     */
    @PostMapping("base/baseSearchWord/addHotSearchWords")
    Integer addHotSearchWords(@RequestBody GoodsMerchantSearchWordDTO goodsMerchantSearchWordDto);
    /**
     * 查询经销商品配置
     * @param commonId
     * @return
     */
    @PostMapping("base/delayGoodsConfig/queryDelayGoodsConfig")
    public BaseGoodsConfigVO queryDelayGoodsConfig(@RequestParam("commonId")Integer commonId);

    /**
     * 查询店铺是否需要经销审核
     * @param goodsUserInfo
     * @return
     */
    @PostMapping("base/dealerApplyInfo/queryDealerApplyByShop")
    DealerApplyInfoVO queryDealerApplyByShop(@RequestBody DealerGoodsUserInfoDTO goodsUserInfo);


    /**
     * 查询oss 配置
     *
     * @return
     */
    @PostMapping("/base/ossConfig/selectOSSInfo")
    ResponseResult selectOSSInfo();
}
